unit Dias;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Grids, DBGrids, StdCtrls, DB, ADODB;

type
  TF_Dias = class(TForm)
    DBGrid1: TDBGrid;
    B_Seleccionar: TButton;
    B_Volver: TButton;
    ADOConnection1: TADOConnection;
    ADOQuery1: TADOQuery;
    DataSource1: TDataSource;
    ADOQuery1NRO_DIA: TAutoIncField;
    ADOQuery1DESC_DIA: TStringField;
    procedure B_SeleccionarClick(Sender: TObject);
    procedure B_VolverClick(Sender: TObject);
    procedure DBGrid1DblClick(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    Bandera_Seleccionar : Boolean;
  end;

var
  F_Dias: TF_Dias;

implementation

uses Alta_Dias;

{$R *.dfm}

procedure TF_Dias.B_SeleccionarClick(Sender: TObject);
begin
    {F_empleados.ADOQuery1COD_ESTADO.Text := ADOQuery1COD_ESTADO.Text; <- AGREGAR}
    SELF.Close;
end;

procedure TF_Dias.B_VolverClick(Sender: TObject);
begin
  SELF.Close;
end;

procedure TF_Dias.DBGrid1DblClick(Sender: TObject);
begin
    {F_empleados.ADOQuery1COD_ESTADO.Text := ADOQuery1COD_ESTADO.Text;
    SELF.Close;
    <- AGREGAR}
end;

procedure TF_Dias.FormClose(Sender: TObject; var Action: TCloseAction);
begin
{    if TRIM(F_AltaEmpleados.DBEdit10.Text) <> '' then
    Begin
      ADOQuery1.SQL.Text := 'SELECT * FROM ESTADO_EMPLEADOS WHERE (COD_ESTADO = '+F_AltaEmpleados.DBEdit10.Text+')';
      ADOQuery1.Open;
      if (BoolToStr(ADOQuery1.IsEmpty) = '-1') then
          F_AltaEmpleados.DBEdit10.SetFocus;
    End;<- AGREGAR }
end;

procedure TF_Dias.FormShow(Sender: TObject);
begin
 ADOQuery1.SQL.Text := 'SELECT * FROM DIAS';
 ADOQuery1.Open;
end;

end.
